<?php
namespace library\tencent\wechat\common;
/**
 * @summary 微信OAuth <http://dwz.cn/Domlv>
 * @author Raven <karascanvas@qq.com>
 * @date 2015-06-10
 */
class WechatConfig
{
//微信接口配置信息
    private function __construct() { }

    public static function get_config_token(){
        return "sId12I1Z50rZiS6L1iRHi15448044ipR";
    }

    public static function get_config_encodingaeskey(){
        $encodingaeskey=self::rand();
        return $encodingaeskey;
    }

    public static function get_config_url(){
        return  $_SERVER['HTTP_HOST'];
    }

    public static function rand(){
        $num="1234567890ABCDEFGHJKLMOPQRSTUVWXYZabcdefghjklmnopqrstuvwxyz";
        $numLen=strlen($num);
        $len=43;
        $code="";
        for($i=0;$i<$len;$i++){
            $code .= $num[rand(0,$numLen-1)];
        }
        return $code;

    }

}
